#include "ui_utils.h"

namespace UIUtils
{
    void showFlDoubleWindow(Fl_Double_Window *window)
    {
        // 先获取屏幕尺寸和窗口尺寸
        int screen_w = Fl::w();
        int screen_h = Fl::h();
        int win_w = window->w();
        int win_h = window->h();

        // 计算居中位置
        window->position(
            (screen_w - win_w) / 2,
            (screen_h - win_h) / 2);

        window->show();
    }
}
